package pers.wj.springcloud.service;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import pers.wj.springcloud.entities.Employee;

import java.util.List;


/**
 * Feign
 *
 * @author wangjie
 * @version V1.0
 * @date 2020/2/28
 */
//@FeignClient(value = "SPRINGCLOUD-PROVIDER")
@FeignClient(value = "SPRINGCLOUD-PROVIDER",fallbackFactory= ClientServiceFallbackFactory.class)
public interface ClientService
{
	@RequestMapping(value = "/dept/get/{id}", method = RequestMethod.GET)
	public Employee get(@PathVariable("id") long id);

	@RequestMapping(value = "/dept/list", method = RequestMethod.GET)
	public List<Employee> list();

	@RequestMapping(value = "/dept/add", method = RequestMethod.POST)
	public boolean add(Employee dept);
}
